import Vue from 'vue'
import VueRouter from 'vue-router'


const Home = () => import('@/views/home/Home');
const Special = () => import('@/views/special/Special');
const Category = () => import('@/views/category/Category');
const Categorylist = () => import('@/views/categorylist/Categorylist');
const Product =()=>import('@/views/product/Product');
const Shopcart =()=>import('@/views/shopcart/Shopcart');
const My = () => import('@/views/my/My');


Vue.use(VueRouter)


const routes = [
  {
    path:'',
    redirect:'/home'
  },
  {
    path:'/home',
    component:Home,
  },
  {
    path:'/my',
    component:My,
  },
  {
    path:'/special',
    component:Special,
  },
  {
    path:'/category',
    component:Category
  },
  {
    path:'/category/:id',
    component:Categorylist
  },
  {
    path : '/product/:id',
    component:Product
  },
  {
    path : '/shopcart',
    component:Shopcart
  },
  

]

const router = new VueRouter({
  routes,
  mode:'history'
})

export default router
